/* webkit内核浏览器的滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

/* 滚动条滑块样式 */
::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 8px;
}

/* 滚动条在鼠标按下未释放时的样式 */
::-webkit-scrollbar-thumb:active {
    background: #666;
}

/* 滚动条轨道样式 */
::-webkit-scrollbar-track {
    background: 0 0;
}

/** 水平滚动条和垂直滚动条交叉部分 */
::-webkit-scrollbar-corner {
    display: none;
}

:root {
    --fill-base: rgb(184, 165, 149);
    --text-base: rgb(106, 85, 102);
    --text-hover: rgb(173, 149, 129);
    --text-active: rgb(255, 255, 255);

    --button-text-base: var(--text-active);
    --button-fill-base: var(--text-hover);

    --slider-track-fill: #9aa09a;
    --slider-thumb-fill: #b8a595;
    --slider-filler-fill: #b8a595;
    --slider-buffer-fill: #7f6b7c;

    --tab-text-base: rgb(86, 73, 81);
    --tab-text-active: rgb(156, 102, 102);
    --tab-fill-hover: rgb(229, 226, 223);
    --tab-fill-active: rgb(220, 212, 206);

    --tab-horizontal-text-base: rgb(86, 73, 81);
    --tab-horizontal-fill-base: rgb(226, 155, 208);
    --tab-horizontal-text-active: rgb(226, 155, 208);

    --accordion-scroll-wrapper-height: 0;

    --table-cell-height: 36px;
    --cell-fill-hover: rgba(228, 228, 228, 0.5);
    --cell-fill-active: rgba(228, 228, 228, 0.7);

    --popover-inner-fill: rgb(30, 31, 35);
    --popover-inner-icon-fill: rgb(176, 158, 143);
    --popover-mode-fill-hover: rgb(43, 44, 47);
    --popover-mode-border-fill: rgb(113, 110, 110);

    --button-icon-size: 1em;
}


.row {
    gap: 8px;
    display: flex;
    align-items: center;
}

.row.center {
    justify-content: center;
}

.row.right {
    justify-content: right;
}

.col {
    gap: 8px;
    display: flex;
    flex-direction: column;
}

.row.min-gap,
.col.min-gap {
    gap: 4px;
}

.row.no-gap,
.col.no-gap {
    gap: 0;
}

.link {
    cursor: pointer;
}

.c-icon {
    width: 1em;
    /*height: 1em;*/
    flex: none;
}

/*====================== Button ===================*/
.c-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0 4px;

    padding: 8px 12px;
    box-sizing: border-box;
    font-size: 13px;
    white-space: nowrap;
    cursor: pointer;
    border-radius: 4px;
    height: 32px;

    background: var(--button-fill-base);
    color: var(--button-text-base);
    outline: none;
    border: none;
}

/*.button:focus {
    border: 1px solid #409eff;
    box-shadow: 0 0 0.25em 0 #409eff;
}*/

.c-button > .c-icon {
    width: var(--button-icon-size) !important;
    fill: var(--button-text-base);
}

/* 设置图片不可拖动 */
.c-image {
    -webkit-user-drag: none;
}

/*====================== CheckBox ===================*/
.c-check-box {
    width: 18px;
    height: 18px;
    padding: 1px;
    display: flex;
    align-items: center;
    border-radius: 2px;
    box-sizing: border-box;
    border: 1px solid rgb(181, 181, 181);
}

.c-check-box.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.c-check-box > .check-icon {
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    padding: 2px 0 0 2px;
    fill: rgb(87, 87, 87);
    background: linear-gradient(to bottom, rgb(238, 238, 238), rgb(218, 218, 218));
}

.c-check-box > .indeterminate-icon {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    box-sizing: border-box;
    background: linear-gradient(to bottom, rgb(238, 238, 238), rgb(218, 218, 218));
}

.c-check-box .indeterminate {
    flex: auto;
    display: flex;
    height: 1px;
    margin: 0 3px;
    border: 1px solid rgb(87, 87, 87);
    box-sizing: border-box;
}

/*====================== Slider ===================*/
.c-slider {
    --slider-inner-size: 4px;
    --slider-thumb-size: 16px;
    --gap: calc(var(--slider-thumb-size) / 2);

    cursor: pointer;
    position: relative;
    box-sizing: border-box;
    min-height: var(--slider-thumb-size);
    margin: 4px var(--gap);
}

.c-slider.vertical {
    min-height: unset;
    min-width: var(--slider-thumb-size);
    margin: var(--gap) 4px;
}

@media screen and (max-width: 1800px) {
    .c-slider {
        --slider-inner-size: 3px;
        --slider-thumb-size: 12px;
    }
}

.c-slider .track {
    width: 100%;
}

.c-slider.vertical .track {
    height: 100%;
}

.c-slider .track, .c-slider .filler, .c-slider .buffer {
    top: 50%;
    position: absolute;
    height: var(--slider-inner-size);
    transform: translate3d(0, -50%, 0);
    pointer-events: none;
}

.c-slider.vertical .track, .c-slider.vertical .filler, .c-slider.vertical .buffer {
    top: unset;
    bottom: 0;
    left: 50%;
    width: var(--slider-inner-size);
    transform: translate3d(-50%, 0, 0);
}

.c-slider .thumb {
    position: absolute;
    border-radius: 50%;
    height: var(--slider-thumb-size);
    width: var(--slider-thumb-size);
    background: var(--slider-thumb-fill);
    transform: translate3d(-50%, 0, 0);
    cursor: grab;
}

.c-slider.vertical .thumb {
    transform: translate3d(0, -50%, 0);
}

.c-slider .track {
    background: var(--slider-track-fill);
}

.c-slider .filler {
    background: var(--slider-filler-fill);
}

.c-slider .buffer {
    background: var(--slider-buffer-fill);
}

/*====================== Table ==================*/
.c-table {
    display: flex;
    flex-direction: column;
    outline: none;
    font-size: 14px;
    overflow: hidden;
    color: var(--text-base);
    line-height: var(--table-cell-height);
}

.c-table > .table-column-wrapper {
    display: grid;
}

.c-table .table-cell {
    padding: 0 8px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    box-sizing: border-box;
    height: var(--table-cell-height);
}

.c-table .table-cell.flex {
    display: flex;
    align-items: center;
    /*line-height: 1;*/
}

.c-table > .table-column-wrapper > .table-cell:not(.gutter) {
    background: rgb(230, 230, 230);
}

.c-table > .table-column-wrapper > .gutter {
    flex: none;
    padding: 0;
    display: flex;
    font-size: 16px;
    align-items: center;
    justify-content: center;
}

.c-table .content-wrapper > .table-cell.hover {
    background: var(--cell-fill-hover);
}

.c-table .content-wrapper > .table-cell.selected {
    background: var(--cell-fill-active);
}

.c-table .content-wrapper > .table-cell.flex > .cell-text {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.c-table .content-wrapper > .table-cell .link:not(:last-child):after {
    content: '/';
    margin: 0 4px;
    color: var(--text-base);
    pointer-events: none;
}

.c-table .content-wrapper > .table-cell .link:hover {
    cursor: pointer;
    color: rgb(226, 155, 208);
}

/*====================== GridView ==================*/
.c-grid {
    flex: 1;
    position: relative;
    overflow: hidden auto
}

.c-grid .content-wrapper {
    display: grid;
    overflow: hidden;
    /*grid-template-columns: repeat(auto-fit, 13em);*/
    grid-template-columns: repeat(auto-fit, minmax(13em, 1fr));
    grid-gap: 3em; /* row-gap: 3em; column-gap: 3em; grid-column-gap: 3em; */
    justify-content: space-around;
    position: sticky;
    top: 0;
    /*
        justify-content属性是整个内容区域在容器里面的水平位置（左中右），align-content属性是整个内容区域的垂直位置（上中下）
        place-content属性是align-content属性和justify-content属性的合并简写形式。

        justify-content: start | end | center | stretch | space-around | space-between | space-evenly;
        align-content: start | end | center | stretch | space-around | space-between | space-evenly;
        place-content: <align-content> <justify-content>
    */
}

.c-grid.minify .content-wrapper {
    justify-content: start;
}

.c-grid .item-cell {
    text-align: center;
    box-sizing: border-box;
    white-space: normal;
}

.c-grid .item-cell .c-image {
    width: 100%;
    height: 13em;
    border-radius: 50%;
    cursor: pointer;
    transition: transform .75s cubic-bezier(0, 1, .75, 1);
}

.c-grid .item-cell:hover .c-image {
    transform: scale(1.07);
}

.c-grid.arc-rect .item-cell .c-image {
    width: 100%;
    height: 10em;
    border-radius: 0.75em;
}

/*====================== TextField ==================*/
.c-input {
    height: 2em;
    color: black;

    padding: 0 0.75em;
    display: flex;
    align-items: center;
    border-radius: 2em;
    background-color: rgb(223, 223, 223);
}

.c-input > .input {
    flex: 1;
    height: 100%;
    max-width: 100%;
    border: none;
    outline: none;
    color: black;
    background: none;
    box-sizing: border-box;
}

/*
    输入框placeholder样式(对于此样式不会出现在浏览器样式列表中)
    Chrome :  ::-webkit-input-placeholder
    Firefox:  -moz-placeholder 或 ::moz-placeholder
    IE10+  :  -ms-input-placeholder
*/
.c-input > .input::-webkit-input-placeholder {
    color: #c0c4cc;
}

/* 解决input元素type为number时显示增加和减小按钮(input::-webkit-outer-spin-button,*/
.c-input > .input::-webkit-inner-spin-button {
    -webkit-appearance: none;
}

.c-input > .c-icon {
    width: .75em;
    height: .75em;
}

/*====================== Accordion ==================*/
.c-accordion {
    width: 200px;
    margin: 0 1px 0 4px;
    color: var(--text-base);
}

.c-accordion,
.c-accordion .row,
.c-accordion .col {
    gap: 0;
}

.c-accordion .c-list-view.expand {
    overflow: hidden;
}

.c-accordion .c-list-view .titled-pane {
    border: solid rgb(200, 200, 200);
    border-width: 1px 1px 0 1px;
    white-space: nowrap;
    padding: 4px;
}

.c-accordion .c-list-view .titled-pane::before {
    content: '';
    border: 8px solid;
    border-color: transparent transparent transparent black;
    border-right: none;
    transition: transform 0.5s ease;
    margin: 0 8px;
}

.c-accordion .c-list-view.expand .titled-pane::before {
    transform: rotate(90deg);
}

.c-accordion .c-list-view.expand .titled-pane,
.c-accordion .c-list-view:not(.expand):last-child .titled-pane {
    border-width: 1px;
}

.c-accordion .c-list-view .scroll-wrapper {
    border: solid rgb(200, 200, 200);
    border-width: 0 1px;
    transition: height 1s;
    overflow: auto;
    height: 0;
}

.c-accordion .c-list-view.expand:last-child .scroll-wrapper {
    border-width: 0 1px 1px 1px;
}

.c-accordion .c-list-view.expand .scroll-wrapper {
    height: var(--accordion-scroll-wrapper-height);
}

.c-accordion .c-list-view .scroll-wrapper::-webkit-scrollbar {
    display: none;
}

.c-accordion .c-list-view .item {
    white-space: nowrap;
    padding: 4px 10px;
}

.c-accordion .c-list-view .item:hover {
    background: var(--cell-fill-hover);
}

.c-accordion .c-list-view .item.selected {
    background: var(--cell-fill-active);
}

/*====================== Index ==================*/
.c-spinner {
    width: 100%;
    height: 100%;
    padding: 0;

    top: 0;
    left: 0;
    z-index: 999;
    position: absolute;

    display: flex;
    align-items: center;
    justify-content: center;

    box-sizing: border-box;
    background-color: rgba(0, 0, 0, .5);
    font-size: 16px;
}

@media screen and (max-width: 1600px) {
    .c-spinner {
        zoom: 0.8;
    }
}

.c-spinner .arc-container {
    width: 6.125em; /* 1em=16px 98px */
    height: 6.125em;
    border-radius: 50%;
    box-sizing: border-box;
    border: 6px solid rgba(255, 255, 255, .1);
    animation: arc-container-circle 1.2s infinite ease-in-out
}

.c-spinner .arc-container .arc-left, .arc-container .arc-right {
    width: 3.0625em; /* 49px */
    height: 6.125em; /* 98px */
    top: -6px;
    position: absolute;
    overflow: hidden;
}

.c-spinner .arc-container .arc-left {
    left: -6px;
}

.c-spinner .arc-container .arc-right {
    right: -6px;
}

.c-spinner .arc-container .arc-inner {
    width: 6.125em;
    height: 6.125em;

    position: absolute;
    border-radius: 50%;
    box-sizing: border-box;
    border: 6px solid rgba(255, 255, 255, .5);
}

.c-spinner .arc-container .arc-left .arc-inner {
    left: 0;
    transition-delay: .5s;
    clip: rect(0, 6.125em, 6.125em, 3.0625em);
}

.c-spinner .arc-container .arc-right .arc-inner {
    right: 0;
    clip: rect(0, 3.0625em, 6.125em, 0);
    animation: arc-right-inner-circle 1.2s infinite linear;
}

.c-spinner .spinner-inner-icon {
    width: 5.5em;
    height: 5.5em;
    fill: white;
    position: absolute;
    animation: spinner-icon 1.2s infinite ease-in-out;
}

@keyframes spinner-icon {
    0%, 100% {
        opacity: .2;
    }
    47%, 53% {
        opacity: .6;
    }
}

@keyframes arc-container-circle {
    0% {
        transform: scaleX(-1) rotate(0) translateZ(0);
    }
    100% {
        transform: scaleX(-1) rotate(180deg) translateZ(0);
    }
}

@keyframes arc-right-inner-circle {
    0% {
        transform: rotate(0) translateZ(0);
    }
    45%, 55% {
        transform: rotate(100deg) translateZ(0);
    }
    100% {
        transform: rotate(360deg) translateZ(0);
    }
}

/*====================== Modal ==================*/
.c-modal {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(56, 56, 56, 0.6);
    -webkit-app-region: none;
}

.c-modal .modal-content {
    background: white;
    border-radius: 10px;
    transition: transform .4s;
    transform: translate3d(100vh, 100vh, 0);
}

.c-modal.opened .modal-content {
    transform: translate3d(0, 0, 0);
}

.c-modal .titled-pane {
    padding: 8px;
    color: var(--text-base);
    border-bottom: 1px solid rgb(222, 223, 224);
}

.c-modal .titled-pane .close-icon {
    width: 16px;
    height: 16px;
    padding: 8px;
    cursor: pointer;
    stroke-width: 2px;
    stroke: rgb(145, 147, 153);
    margin: 0 0 0 auto;
    transform: scale(0.8);
}

.c-modal .titled-pane .close-icon:hover {
    stroke: white;
    background: rgb(255, 102, 102);
}

.c-modal > .modal-content > .content {
    flex: 1;
    padding: 14px;
    overflow: hidden auto;
    align-items: center;
}

.c-modal.content-left > .modal-content > .content {
    align-items: unset;
}

/*====================== message ==================*/
.c-message {
    position: absolute;
    top: 20px;
    left: 50%;
    z-index: 9999;
    padding: 12px;
    min-width: 300px;
    border-radius: 4px;

    display: flex;
    align-items: center;
    gap: 10px;

    box-sizing: border-box;
    border: 1px solid #ebeef5;
    background-color: #edf2fc;
    transform: translateX(-50%);
    transition: opacity .3s, transform .4s, top .4s;
    -webkit-app-region: none; /* electron独有的属性,防止message在标题栏上不能响应操作 */
}

.c-message.success > .message-icon {
    fill: #67c23a;
}

.c-message.error > .message-icon {
    fill: #f56c6c;
}

.c-message.info > .message-icon {
    fill: #909399;
}

.c-message.warning > .message-icon {
    fill: #e6a23c;
}

.c-message .content {
    flex: auto;
    padding: 0;
    font-size: 12px;
    line-height: 1;
    display: flex;
}

.c-message.info > .content {
    color: #909399;
}

.c-message.success {
    background-color: #f0f9eb;
    border-color: #e1f3d8;
}

.c-message.success > .content {
    color: #67c23a;
}

.c-message.warning {
    background-color: #fdf6ec;
    border-color: #faecd8;
}

.c-message.warning > .content {
    color: #e6a23c;
}

.c-message.error {
    background-color: #fef0f0;
    border-color: #fde2e2;
}

.c-message.error > .content {
    color: #f56c6c;
}

.message-icon {
    flex: none;
}

.c-message .close-icon {
    flex: none;
    fill: #c0c4cc;
    cursor: pointer;
    font-size: 26px;
}

.c-message .close-icon:hover {
    fill: #909399;
}

.c-message-fade-enter-from, .c-message-fade-leave-to {
    opacity: 0;
    transform: translate(-50%, -100%);
}

/*====================== Pagination ==================*/
.c-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
}

.c-pagination .item {
    padding: 6px 12px;
    border: solid #ddd;
    border-width: 1px 1px 1px 0;
    box-sizing: border-box;
    background: white;
    color: #337ab7;
    text-align: center;
}

.c-pagination .item.prev-button {
    border-width: 1px;
    border-radius: 4px 0 0 4px;
}

.c-pagination .item.next-button {
    border-radius: 0 4px 4px 0;
}

.c-pagination .item:hover {
    cursor: pointer;
    color: #23527c;
    background: #eee;
}

.c-pagination .item.active {
    color: white;
    cursor: default;
    pointer-events: none;
    background-color: #337ab7;
}

.c-pagination .item.disabled {
    color: #777;
    background-color: #f5f5f5;
    cursor: not-allowed;
}

.c-pagination .item.more {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.c-pagination .item.more::after {
    content: '∙∙∙'; /* ••• */
    font-size: 1.5em;
    line-height: 0;
}

.c-pagination .item.prev-more-button:hover::after {
    content: '«'; /* ❮❮ */
    padding: 0 0 2px 0;
}

.c-pagination .item.next-more-button:hover::after {
    content: '»'; /* ❯❯ */
    padding: 0 0 2px 0;
}

/*====================== Popover ==================*/
.c-popover-trigger {
    display: flex;
}

.c-popover {
    position: fixed;
    padding: 8px 0;
    z-index: 9;
    background: white;
    border-radius: 4px;
    /*box-shadow: 0 0 10px 0 hsl(0deg 0% 72% / 65%);*/
    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1);
    /*border: 1px solid #bfbfbf;*/
    outline: none;
    color: var(--text-base);

    opacity: 0;
    transform: scale3d(0, 0, 0);
    transition: transform .3s cubic-bezier(.23, 1, .32, 1), opacity .3s cubic-bezier(.23, 1, .32, 1);

    /* https://github.com/electron/electron/issues/1354 */
    -webkit-app-region: none;
}

.c-popover[data-placement ^= 'top'] {
    transform-origin: center bottom;
}

.c-popover[data-placement ^= 'bottom'] {
    transform-origin: center top;
}

.c-popover[data-placement ^= 'right'] {
    transform-origin: right center;
}

.c-popover[data-placement ^= 'left'] {
    transform-origin: left center;
}

.c-popover.expand {
    transform: scale3d(1, 1, 1);
    opacity: 1;
}

.c-popover.arrow.expand::after {
    content: '';
    position: absolute;
    bottom: 0;
    transform: translate(0, 100%);
    border-width: 12px 8px 0;
    border-style: solid;
    border-color: var(--popover-inner-fill) transparent transparent;
    /* width: 1em; height: 0.75em; background: var(--popover-inner-fill); clip-path: polygon(100% 0, 50% 100%, 50% 100%, 0 0); */
}

.c-popover .dropdown-item {
    padding: 0.5em;
    min-width: 80px;
    cursor: pointer;
}

.c-popover .dropdown-item.separator {
    border-bottom: 1px solid #f0f0f0;
    margin: 0 0 8px 0;
}

.c-popover .dropdown-item:hover {
    background: rgb(245 247 250);
}

/*====================== TabPane ==================*/
.c-tab-pane {
    flex: 1;
    display: flex;
    overflow: hidden;
    box-sizing: border-box;
}

.c-tab-pane.horizontal {
    flex-direction: column;
}

.c-tab-pane > .tab-container {
    display: flex;
    flex-direction: column;
    gap: 8px 0;
    padding: 12px;
    box-sizing: border-box;
}

.c-tab-pane.horizontal > .tab-container {
    padding: 0;
    flex-direction: row;
    justify-content: center;
    gap: 0 40px;
}

.c-tab-pane > .tab-container > .tab {
    font-size: 14px;
    display: flex;
    align-items: center;
    padding: 10px 20px;
    cursor: pointer;
    gap: 0 12px;
    border-radius: 4px;
    line-height: 1;
    color: var(--tab-text-base);
}

.c-tab-pane > .tab-container > .tab:hover {
    background: var(--tab-fill-hover);
}

.c-tab-pane > .tab-container > .tab.active {
    color: var(--tab-text-active);
    background: var(--tab-fill-active);
}

.c-tab-pane.horizontal > .tab-container > .tab {
    gap: 8px;
    padding: 0;
    min-width: 64px;
    background: none;
    flex-direction: column;
    color: var(--tab-horizontal-text-base);
}

.c-tab-pane.horizontal > .tab-container > .tab.active {
    color: var(--tab-horizontal-text-active);
}

.c-tab-pane.horizontal > .tab-container > .tab:after {
    content: '';
    width: 0;
    height: 3px;
    display: block;
    background: var(--tab-horizontal-fill-base);
    transition: width 0.3s ease-in-out;
}

.c-tab-pane.horizontal > .tab-container > .tab.active:after,
.c-tab-pane.horizontal > .tab-container > .tab:hover:after {
    width: 100%;
}

.c-tab-pane > .tab-container > .tab > .c-icon {
    fill: var(--tab-text-base);
    width: 18px;
    height: 18px;
}

.c-tab-pane > .tab-container > .tab.active > .c-icon {
    fill: var(--tab-text-active);
}

.c-tab-pane > .tab-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 12px 0 0 12px;
    overflow: hidden;
    box-sizing: border-box;
}

.c-tab-pane.horizontal > .tab-content {
    padding: 12px 0 0 0;
}